﻿Imports JuegosLanBackend


Public Class WebForm3
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub GridView1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles datacabina.SelectedIndexChanged

    End Sub

    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        'Ingresar los datos a la base de datos
        Dim x = Me.NOMBOX.Text

        Dim y = Me.DIRBOX.Text


        Dim n = New CabinaNegocio()

        Dim paquete = n.insertar(x, y)

        MsgBox("Cabina Registrada ")

        'Redirecciona a cabinas

        Response.Redirect("cabinas.aspx")


    End Sub

    Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click


        Dim cabina = New CabinaNegocio

        Dim lista = cabina.buscarPorNombre(Me.NOMLISBOX.Text)

        datacabina.DataSource = lista
        datacabina.DataBind()





    End Sub

    Protected Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click


        'Ingresar los datos a la base de datos
        Dim x = Me.TextBox1.Text

        Dim y = Me.TextBox2.Text

        

        Dim n = New CabinaNegocio()

        Dim paquete = n.insertar(x, y)

        '  MsgBox("Cabina Registrada")

        Label7.Text = "Cabina Registrada"
        Response.Redirect("cabinas.aspx")

        

    End Sub
End Class